package com.oc.claimobs.bb.facade;

import com.oc.claimobs.bb.dao.MemoryDao;
import com.oc.claimobs.bb.model.Reclamo;

public class ReclamoService {

	private Persistance dao = MemoryDao.getInstance();
	
	public void delete(Integer k) {
		String key = prepareKey(k);
		dao.delete(key);
	}

	public Reclamo getByKey(Integer k) {
		String key = prepareKey(k);
		return (Reclamo)dao.getByKey(key);
	}

	public void saveOrUpdate(Integer k, Object o) {
		String key = prepareKey(k);
		dao.saveOrUpdate(key, o);
	}
	private String prepareKey(Integer k){
		String key = Reclamo.class.getName();
		key += "#" + k.toString();
		return key;
	}

	
}
